package de.ghost23.stubcodegenerator.model;

import java.util.ArrayList;
import java.util.List;

public class PackageObj {
	
	public String name;
	
	public List<PackageObj> childPackages;
	
	public List<FileObj> childFiles;
	
	public PackageObj() {
		
		childPackages = new ArrayList<PackageObj>();
		childFiles = new ArrayList<FileObj>();
	}
	
	public String toString() {
		
		String result = "Package: " + name + "\n";
		result += "Files: \n";
		for(int i = 0; i < childFiles.size(); i++) {
			result += "\t" + childFiles.get(i).toString() + "\n";
		}
		
		result += "Childs: \n";
		for(int j = 0; j < childPackages.size(); j++) {
			result += "\t" + childPackages.get(j).toString() + "\n";
		}
		
		return result;
	}
}
